import java.lang.reflect.Field;
import java.util.Vector;

/**
 * Created by zhihao.guo on 2019-02-08.
 */
public class NoClassDefFoundErrorExample {
    public ClassWithInitErrors getClassWithInitErrors() throws IllegalAccessException, NoSuchFieldException {
        ClassWithInitErrors test;

        System.out.println("-------------");
        try {
            test = new ClassWithInitErrors();
        } catch (Throwable t) {
            System.out.println(t);
        }

        try {
            test = new ClassWithInitErrors();
        } catch (Throwable t) {
            System.out.println(t);
        }

        try {
            test = new ClassWithInitErrors();
        } catch (Throwable t) {
            System.out.println(t);
        }

        return null;
    }

    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {
        NoClassDefFoundErrorExample sample
                = new NoClassDefFoundErrorExample();
        sample.getClassWithInitErrors();
    }
}
